<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>

<ul class="yhq-main clearfix">
	<c:forEach var="info" items="${list }">
	<li>
    	<div class="yhq-con <c:choose><c:when test="${info.state==1 && info.diffday>=0 }"></c:when><c:otherwise>yhq-past</c:otherwise></c:choose>">
        	<div class="yhq-title"><em>${info.offer_money }元</em> ${info.name }</div>
            <div class="yhq-txt">
            	<p>使用条件：满${info.min_money }元</p>
            	<p>有效期：${info.startdate }－${info.enddate }</p>
            </div>
            
            <c:if test="${info.state==1 && info.diffday>=0 }">
            	<span>未使用</span>
            </c:if>
            <c:if test="${info.state==2 }">
            	<span>已使用</span>
            </c:if>
            <c:if test="${info.diffday<0 }">
            	<span>已过期</span>
            </c:if>
        </div>
    </li>
    </c:forEach>
</ul>
<c:if test="${list.size()==0 }">
    <div class="nodata"><img src="${ctx}/wesite/images/temp/u7647.png"></div>
</c:if>